//
//  DialogChooseCheckCell.m
//  CarDeal_IOS
//
//  Created by 孙可 on 2019/3/5.
//  Copyright © 2019年 sunke. All rights reserved.
//

#import "DialogChooseCheckCell.h"

@implementation DialogChooseCheckCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        _stateView = [[UIImageView alloc] init];
        _stateView.image = [UIImage imageNamed:@"project_unselect"];
        [self addSubview:_stateView];
        
        _tvName = [[UILabel alloc] init];
        _tvName.textColor = title_color;
        _tvName.font = textFont;
        [self addSubview:_tvName];
        
        UIView * lineView = [[UIView alloc]init];
        lineView.backgroundColor = line_color;
        [self addSubview:lineView];
        
        [_stateView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.equalTo(self).offset(15);
            make.size.mas_equalTo(CGSizeMake(16, 16));
        }];
        
        [_tvName mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.equalTo(self);
            make.left.equalTo(_stateView.mas_right).offset(15);
        }];
        
        [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.left.right.equalTo(self);
            make.height.mas_equalTo(1);
        }];
        
    }
    return self;
}

@end
